package com.pys.common.beans;

import javax.faces.application.FacesMessage;

import com.pys.utils.FacesUtils;

public abstract class BaseBean {

	public boolean hasError() {
		if (FacesUtils.flashGet("error") != null) {
			FacesUtils.addMessage(FacesMessage.SEVERITY_ERROR, "ERROR_SYSTEM");
			return true;
		}
		return false;
	}

	public abstract void saveAction();

	public abstract void refreshList();

	public abstract void deleteAction();

	public abstract void updateAction();

	public abstract void clear();

	public void cancelAction() {
		clear();
	}

}
